from fastapi import FastAPI
import  rss_query
from pydantic import BaseModel

app = FastAPI()

class GetQuestion(BaseModel):
    question: str = ''

@app.post("/chat")
async def qa(data: GetQuestion = None):
    answer = rss_query.query_news(data.question)
    return {"message": answer}